﻿using System;
using School.DAL;

public partial class UserControls_AuthentificatedUserInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblUserName.Text = AppSecurityContext.IsAuthenticated ? AppSecurityContext.AuthenticatedUser.Login : "";
        btnSingOut.Enabled = AppSecurityContext.IsAuthenticated;
    }

    protected void btnSingOut_Click(object sender, EventArgs e)
    {
        AppSecurityContext.Logout();
    }
}
